import buble from '@rollup/plugin-buble'

let isDev = process.env.NODE_ENV === 'development'

export default {
    input: 'sdk/index.js',
    watch: {
        enclude: 'node_modules/**'
    },
    output: {
        file: isDev ? 'web/static/sdk/monitor.umd.js' : 'sdk/dist/monitor.umd.js',
        name: 'monitor',
        format: 'umd' // CMD/AMD/直接挂载
    },
    plugins: [
        buble()
    ]
}